<div class="divFormFieldLabel" style="position:relative;">{$content.label|htmlentities}</div>
<div class="divFormFieldInput" id="div{$content.fieldname}_{$obj.obj_id}" style="position:relative;width:500px;">
	<input type="hidden" name="{$prefix}[{$content.fieldname}]{$suffix}[file]" id="file_{$content.fieldname}_{$obj.obj_id}" value="{$content.file.name}"/>
	<input type="hidden" name="{$prefix}[{$content.fieldname}]{$suffix}[dir]" id="dir_{$content.fieldname}_{$obj.obj_id}" value="{$content.file.dir}"/>

	<div id="{$content.fieldname}_{$obj.obj_id}_container" {if !is_array($content.file)}style="display:none;"{/if}>	
		<h4 class="line">{$smarty.config.Forms_file_selected}</h4>
		<br />

		<div style="float:left;">
			{$smarty.config.Forms_file_description}:<br />
			<input type="text" name="{$prefix}[{$content.fieldname}]{$suffix}[description]" id="description_{$content.fieldname}_{$obj.obj_id}" class="FormFieldInput" value="{$content.image.picture_description|htmlentitiesutf8}" style="width:325px;" /><br />
		
			<div style="float:left;width:60px;">{$smarty.config.Forms_file_filemame}:</div>
			<div style="float:left;"><span id="{$content.fieldname}_{$obj.obj_id}_label">{$content.file.name}</span></div>
			<div class="clear"></div>
			<div style="float:left;width:60px;">{$smarty.config.Forms_file_type}:</div>
			<div style="float:left;" id="{$content.fieldname}_{$obj.obj_id}_type">{$content.file.end}</div>
			<div class="clear"></div>
			<div style="float:left;width:60px;">{$smarty.config.Forms_file_size}:</div>
			<div style="float:left;" id="{$content.fieldname}_{$obj.obj_id}_size">{$content.file.file_size}</div>
			<div class="clear"></div>
			<div style="float:left;width:60px;">{$smarty.config.Forms_file_original}:</div>
			<div style="float:left;"><a id="{$content.fieldname}_{$obj.obj_id}_anchor" href="{$MEDIA_WEB}{$content.file.dir}{$content.file.dir}" target="_blank">&raquo; {$smarty.config.Forms_file_show}</a></div>
			<div class="clear"></div>
			<input type="button" value="{$smarty.config.Forms_file_remove_image}" style="width:160px;" onclick="CMS.reset_image('{$content.fieldname}_{$obj.obj_id}');" /><br />
		</div>
		<div class="clear"></div>	
	</div>
	<h4 class="line">
		<span style="float:left;" onclick="CMS.open_upload('{$content.fieldname}_{$obj.obj_id}')">{$smarty.config.Forms_file_select_new}</span>
		<span style="float:right">
			<a href="javascript:void(0);" onclick="CMS.open_upload('{$content.fieldname}_{$obj.obj_id}')">{strip}
				{if is_array($content.file)}
				<img src="img/icon-formtype-open.gif" style="padding:0;margin:0;" id="{$content.fieldname}_{$obj.obj_id}_upload_switch" vspace="0" hspace="0" border="0" alt="" />
				{else}
				<img src="img/icon-formtype-close.gif" style="padding:0;margin:0;" id="{$content.fieldname}_{$obj.obj_id}_upload_switch" vspace="0" hspace="0" border="0" alt="" />
				{/if}
			{/strip}</a>
		</span>
		<div class="clear" style="margin:0;"></div>
	</h4>
	<br />
	<div id="{$content.fieldname}_{$obj.obj_id}_upload" style="{if is_array($content.file)}display:none;{/if}">
		<div style="float:left;width:140px;color:#333;font-size:12px;">{$smarty.config.Forms_file_upload_a}:</div>
		<div style="float:left;"><input type="button" style="width:90px;" value="{$smarty.config.Forms_file_select_image}" onclick="{strip}{literal}
				CMS.FileManager.open({
						{/literal}
						root:'media',
						project_id:'{$project_id}',
						multiple:false,
						{literal}
						post_params:{
						{/literal}
							open_dir:xajax.$('dir_{$content.fieldname}_{$obj.obj_id}').value
						{literal}
						},
						callback:{
							ccdsfun:'FileManagerReturnFile',
							ccdsclass:'ccdsFileManager'
						},						
						returnfield:{
						{/literal}
								file : xajax.$('file_{$content.fieldname}_{$obj.obj_id}'),
								dir : xajax.$('dir_{$content.fieldname}_{$obj.obj_id}'),
								label : xajax.$('{$content.fieldname}_{$obj.obj_id}_label'),
								size : xajax.$('{$content.fieldname}_{$obj.obj_id}_size'),
								type : xajax.$('{$content.fieldname}_{$obj.obj_id}_type'),
								anchor: xajax.$('{$content.fieldname}_{$obj.obj_id}_anchor'),
								description : xajax.$('description_{$content.fieldname}_{$obj.obj_id}'),
								container:xajax.$('{$content.fieldname}_{$obj.obj_id}_container')
						{literal}
						}
					});
					{/literal}{/strip}" />
		</div>	
		{if !empty($content.default_path)}
			<div class="clear" style="border-bottom:1px solid #d7d7d7;padding-top:10px;margin-bottom:10px;"></div>	
			<div style="float:left;width:140px;color:#333;font-size:12px;">{$smarty.config.Forms_file_upload_b}:</div>
			<div class="clear"></div>	

			<div>
				<div style="float:left;width:125px;margin-left:15px;">
					<h5>{$smarty.config.Forms_file_dest_folder}:</h5>
				</div>
				<div style="float:left;">
					{$smarty.config.Forms_file_upload_dir1}:<br />
					&quot;<span id="{$content.fieldname}_{$obj.obj_id}_path_label">{$content.default_path}&quot;</span><br />
					(<a href="javascript:void(0);" onclick="{strip}
					{literal}xajax.request({
									ccdsfun:'FileManagerDirSelectorOpen',
									ccdsclass:'ccdsFileManager'	
					},
					{
						parameters:
							[
								{{/literal}
									root:'media',
									dir:'/',
									project_id:'{$project_id}',
									field:'{$content.fieldname}_{$obj.obj_id}_path'
								{literal}}
							]
						}
						);
					{/literal}{/strip}">{$smarty.config.Forms_file_change_dir}</a>)<br />
				</div>
				<div class="clear"></div>	

				<div style="float:left;width:125px;margin-left:15px;">
					<h5>Dateiauswahl:</h5>
				</div>
				<div style="float:left;">
					<div>
						<input type="hidden" name="path" id="{$content.fieldname}_{$obj.obj_id}_path" value="{$content.default_path}" />
						<input type="input" type="file" name="{$prefix}[{$content.fieldname}]{$suffix}[up]" id="up_{$obj.obj_id}_{$content.fieldname}" size="50" />
					</div>
			
					<input type="button" class="submitbtn" value="{$smarty.config.Forms_file_upload}" style="width:160px;" onclick="{strip}
						{literal}
		
						xajax.request(
							{
								ccdsclass:'ccdsContentEditor',
								ccdsfun:'ContentEditorFileUpload'
							},
							{
								parameters:[
									{{/literal}
										obj_id:{$obj.obj_id},
										obj_vers_id:xajax.$('obj_vers_id_{$obj.obj_id}').value,
										filefield:'up_{$obj.obj_id}_{$content.fieldname}',
										fieldname:'{$content.fieldname}',
										project_id:'{$project_id}',
										root:'media',
										path:xajax.$('{$content.fieldname}_{$obj.obj_id}_path').value
									{literal}}
								],
								mode:'SWFupload',
								SWFfield:'{/literal}up_{$obj.obj_id}_{$content.fieldname}{literal}',
								context: 
								{ 
									{/literal}
										file : xajax.$('file_{$content.fieldname}_{$obj.obj_id}'),
										dir : xajax.$('dir_{$content.fieldname}_{$obj.obj_id}'),
										label : xajax.$('{$content.fieldname}_{$obj.obj_id}_label'),
										size : xajax.$('{$content.fieldname}_{$obj.obj_id}_size'),
										type : xajax.$('{$content.fieldname}_{$obj.obj_id}_type'),
										anchor: xajax.$('{$content.fieldname}_{$obj.obj_id}_anchor'),
										description : xajax.$('description_{$content.fieldname}_{$obj.obj_id}'),
										container:xajax.$('{$content.fieldname}_{$obj.obj_id}_container')
									{literal} 
								}
							}
						);
						{/literal}
					{/strip}" />
				</div>
			</div>
			<div class="clear"></div>	
		{/if}
	</div>
</div>
<br style="clear:both;" />